#ifndef  KeyBoard_H
#define  KeyBoard_H

#include <QtGui>
#include <QSignalMapper>
#include "ui_keyboard.h"

enum {
    iMode_Normal = 0,
    iMode_Passwd = 1
};

namespace Ui {
    class KeyBoard;
}
//InputIPAddr=1,
//InputSubNetMask,
//InputGateWay,
//InputDNS,
enum input_name{
     InputNone=0,
     InputNet=1,
     InputMacAddr,
     InputPassword,
     InputMax
};

class KeyBoard : public QDialog, Ui::KeyBoard
{
    Q_OBJECT

public:
     KeyBoard(enum input_name name,QString str);
     ~KeyBoard();

public:
     QString text;

private:
     QSignalMapper *signalMapper;
     QPoint dragPosition;
     bool caps_Lock;
     int inputMode;
     bool waitingForOperand;

private:
     void setMapper();
     void connectMapper();

signals:
     void setvalue(const QString &);

private slots:
     void on_toolButton_Cancel_clicked();
     void onCursorRight();
     void onCursorLeft();
     void onCursorUp();
     void onCursorDown();


     void setDispText(const QString& text);

     void onCapslock();
     void onEnter();
     void onBackspace();
     void onEsc();

};

#endif //  KeyBoard_H
